<%@page import="multiface.kooper.jpa.*"%>
<%@page import="javax.persistence.*"%>
<div id="left" class="left"> 
    <%
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("KooperPU");
        EntityManager em = emf.createEntityManager();
        User ul = (User) session.getAttribute("user");

        out.print("<p style=\"font-size:16px\">" + ul.getName() + " " + ul.getSurname() + "</p>");
    %>
    <div class="user image">
        <img alt="image user" src="../GetImageServlet?uid=<%=ul.getId()%>"/>
    </div>

    <ul class="user menu">
        <li>Abouts </li>
        <li class="italic gray"><a href="post.jsp" class="regular black bold">Posts</a> <%=ul.getPostList().size()%></li>
        <li class="italic gray"><a href="question.jsp" class="regular black bold">Question</a> <%=ul.getQuestionList().size()%></li>
        <li class="italic gray"><a href="answeer.jsp" class="regular black bold">Answeers</a> <%=ul.getAnswerList().size()%></li>
    </ul>
    <div class="follow image tiny">
        <%
            out.print("<p>Followed by " + ul.getUserList1().size() + " People</p>");
            for (User f : ul.getUserList1()) {
                out.print("<img class=\"image_tiny\" alt=\"image user\" src=\"../GetImageServlet?uid=" + f.getId() + "\"/>");
            }
        %>
    </div>
    <div class="follow image tiny">
        <%
            out.print("<p>Following by " + ul.getUserList().size() + " People</p>");
            for (User f : ul.getUserList()) {
                out.print("<img class=\"image_tiny\" alt=\"image user\" src=\"../GetImageServlet?uid=" + f.getId() + "\"/>");
            }
        %>
    </div>
</div>